<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head></h:head> 
<body>
    <rich:panel>
        <f:facet name="header">
        	<h1 align="center" style="color:#792B2B;bottom: inherit;font-family: 'KacstPoster';" title="">CREAR CLIENTE</h1>
        </f:facet>
		<!--  <h:outputText value="" >-->
			<h:form>       
			<center> 	
        		<h:panelGrid columns="3" style="color:#381C32;font-weight: bold;">
        			Cedula
        			<h:inputText value="#{clienteBean.newCliente.cliCedula}" id="txtced">
        	<!--			<f:validator validatorId="ups.apps.validadores.CedulaValidator"></f:validator>-->
        			</h:inputText>
        			<h:message for="txtced"/>
        			Nombres
        			<h:inputText value="#{clienteBean.newCliente.cliNombres}" id="txtnom">
        				<f:validateRequired/> <f:validateLength minimum="3" maximum="15"/>
        			</h:inputText>
        			<h:message for="txtnom"/>
        			Direccion
        			<h:inputText value="#{clienteBean.newCliente.cliDireccion}" id="txtdir"><f:validateRequired/></h:inputText>
        			<h:message for="txtdir"/>
        			Telefono
        			<h:inputText value="#{clienteBean.newCliente.cliTelefono}" id="txttelf">
        				<f:validateRequired/> <f:validateLength minimum="6" maximum="12"/>
        			</h:inputText>
        			<h:message for="txttelf"/>
        			         	   		      			
        			Usuario
					<h:selectOneMenu value="#{clienteBean.use}">
					<f:selectItems value="#{clienteBean.listUsuario}" var="user" itemValue="#{user}" itemLabel="#{user.usrUsuario}">
					</f:selectItems>
					<f:converter converterId="UsuarioConverter"/>
					</h:selectOneMenu>
        			</h:panelGrid>
         	   		</center>
        		
        		<p></p>
        		<center>
        		<h:panelGrid columns="3">
        		<h:commandButton action="#{clienteBean.guardar()}" value="Crear" style="color:#C93A3A;background-color:#BFBFBF;font-weight: bold;">
        			<f:ajax render="@form" execute="@form"/>
        			</h:commandButton>
        			<h:message infoStyle="DATOS GUARDADOS"/>
        		</h:panelGrid>
        		</center>
        	</h:form>
		<!-- </h:outputText> -->
	</rich:panel>
</body> 
</html>
